package it.koutifaris.travianmap.view.commandlistview;

import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

public class ListViewOnItemClickListener implements OnItemClickListener {

	@Override
	public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
		ListView listView = (ListView) parent;
		ListElement item = (ListElement) listView.getItemAtPosition(position);
		item.getClickCommand().execute();
	}

}
